package ldh.fx.adminfx;

import javafx.application.Application;
import javafx.scene.Scene;
import javafx.scene.image.Image;
import javafx.scene.image.ImageView;
import javafx.scene.layout.StackPane;
import javafx.stage.Stage;
import javafx.stage.StageStyle;
import ldh.fx.adminfx.help.MovableHelper;
import ldh.fx.adminfx.help.ResizeHelper;

public class ImageTest extends Application {
    @Override
    public void start(Stage primaryStage) throws Exception {
        ImageView imageView = new ImageView();
        Image image = new Image(this.getClass().getResource("/img/bb/11.jpg").toExternalForm());
        imageView.setImage(image);

        StackPane stackPane = new StackPane(imageView);
        Scene scene = new Scene(stackPane, 600, 300);
        primaryStage.setScene(scene);
        primaryStage.initStyle(StageStyle.TRANSPARENT);
        ResizeHelper.addResizeListener(primaryStage);
        MovableHelper.movable(stackPane);
        primaryStage.show();
    }
}
